package com.ss.android.article.browser.download.a;

import android.app.Activity;
import android.webkit.DownloadListener;

import com.ss.android.article.browser.preference.PreferenceManager;
import com.ss.android.common.app.permission.PermissionsManager;

public final class b implements DownloadListener {
    private final Activity a;

    public b(Activity arg1) {

        PreferenceManager.getInstance();
        com.ss.android.article.browser.download.a.a.a();
        com.ss.android.article.browser.database.a.b.a();
        this.a = arg1;
    }

    static Activity a(b arg1) {
        return arg1.a;
    }

    public final void onDownloadStart(String arg12, String arg13, String arg14, String arg15, long arg16) {
        PermissionsManager.getInstance().requestPermission(this.a, new String[]{
                        "android.permission.READ_EXTERNAL_STORAGE",
                        "android.permission.WRITE_EXTERNAL_STORAGE"},
                new c(this, arg12, arg14, arg15, arg16, arg13));
    }
}

